/**
* @Description：UI混入方法
* @Author wyt
* @Date 2023-09-27
*/
// eslint-disable-next-line import/no-mutable-exports
const uiFunMixin = {
  created() {
    this.mixinDialog()
  },
  methods: {
    /**
    * @Description：覆盖elementui 对话框
    * @Author wyt
    * @Date 2023-09-27
    */
    mixinDialog() {
      this.$confirm = (msg = '确认进行该操作么？') => {
        // 确认框
        return new Promise(resolve => {
          const confirmDia = global.utilMessage.confirm(msg, () => {
            // 请求成功后，销毁弹框
            resolve(true)
          }, () => {
          })
        })
      }
    }
  }
}

export default uiFunMixin
